﻿using UnityEngine;
using System.Collections;
using PBMessage;
namespace GameUnit
{
    public class Ability : MonoBehaviour
    {
        public Unit Unit;
        public string AbilityKey;
        public Hashtable TableInfo;
        public virtual int GetTypeId()
        {
            return 0;
        }

        public virtual void HandlerEvent(SC_AbilityEvent abilityEvent)
        {

        }
        public virtual void Init(Hashtable abilityData)
        {
            this.AbilityKey = (string)abilityData[":name"];
            this.TableInfo = abilityData;
        }
        public virtual void OnLoad()
        {

        }
        public virtual void ServerUpdate(SC_ServerUpdate updatePacket) { }
        public virtual void Destory() { }
    }
}
